package com.ucode.application.vo.acis;

import com.ucode.acis.mode.Anthology;
import com.ucode.oss.model.FileInfo;

public class AnthologyVo extends Anthology{

    private String coverUrl;
    
    private String coverName;
    
    public AnthologyVo(Anthology anthology,FileInfo coverFile){
        if(anthology != null){
            this.setId(anthology.getId());
            this.setCreatedTime(anthology.getCreatedTime());
            this.setUpdatedTime(anthology.getUpdatedTime());
            this.setDeltag(anthology.getDeltag());
            this.setName(anthology.getName());
            this.setCoverId(anthology.getCoverId());
            this.setSummary(anthology.getSummary());
            this.setIntro(anthology.getIntro());
            this.setSort(anthology.getSort());
        }
        if(coverFile != null){
            this.setCoverUrl(coverFile.getUrlprefix()+coverFile.getFilePath());
            this.setCoverName(coverFile.getSourceName());
        }
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getCoverName() {
        return coverName;
    }

    public void setCoverName(String coverName) {
        this.coverName = coverName;
    }
    
}
